home *** CD-ROM | disk | FTP | other *** search
-
-
-
- Tcl_AssembleCmd Tcl Command Language Library Tcl_AssembleCmd
-
-
-
- _________________________________________________________________
-
- NNAAMMEE
- Tcl_CreateCmdBuf, Tcl_AssembleCmd, Tcl_DeleteCmdBuf - buffer
- pieces of Tcl commands
-
- SSYYNNOOPPSSIISS
- ##iinncclluuddee <<ttccll..hh>>
-
- Tcl_CmdBuf
- TTccll__CCrreeaatteeCCmmddBBuuff()
-
- TTccll__DDeelleetteeCCmmddBBuuff(_b_u_f_f_e_r)
-
- char *
- TTccll__AAsssseemmbblleeCCmmdd(_b_u_f_f_e_r, _s_t_r_i_n_g)
-
- AARRGGUUMMEENNTTSS
- Tcl_CmdBuf _b_u_f_f_e_r (in) Token for a command buffer
- (the result of some previ-
- ous call to
- TTccll__CCrreeaatteeCCmmddBBuuff).
-
- char *_s_t_r_i_n_g (in) Additional piece of com-
- mand input to be added to
- anything currently buf-
- fered.
-
- _________________________________________________________________
-
-
- DDEESSCCRRIIPPTTIIOONN
- These three procedures provide a convenient mechanism for
- assembling Tcl commands from an input source where command
- boundaries are not obvious. For example, if input is being
- read from a terminal, a user may type commands that span
- multiple lines. In situations like this, TTccll__AAsssseemmbblleeCCmmdd
- can be called with the individual lines as they are
- received. It buffers the lines internally and returns full
- commands when they are complete.
-
- A command buffer is created by calling TTccll__CCrreeaatteeCCmmddBBuuff, and
- it is deleted by calling TTccll__DDeelleetteeCCmmddBBuuff. There may be any
- number of command buffers for a particular program or even
- for a particular interpreter; in most cases there should be
- one buffer for each independent source of command input.
-
- When input arrives from a source you should call
- TTccll__AAsssseemmbblleeCCmmdd, passing it the new input as the _s_t_r_i_n_g
- argument. TTccll__AAsssseemmbblleeCCmmdd will add the new input to any-
- thing currently buffered in _b_u_f_f_e_r. If the information now
- buffered represents a complete Tcl command (i.e. the whole
- command ends with a newline character and there are no
- unmatched quotes, braces, or brackets), then TTccll__AAsssseemmbblleeCCmmdd
-
-
-
- Sprite v.1.0 Printed: April 19, 1991 1
-
-
-
-
-
-
- Tcl_AssembleCmd Tcl Command Language Library Tcl_AssembleCmd
-
-
-
- returns a pointer to the complete command and arranges for
- the buffer to be cleared on the next call to
- TTccll__AAsssseemmbblleeCCmmdd. If the command is still incomplete
- (because, for example, there are unmatched braces) then
- TTccll__AAsssseemmbblleeCCmmdd returns NULL. TTccll__AAsssseemmbblleeCCmmdd keeps a
- private copy of the command being assembled, so that the
- caller need not preserve the contents of _s_t_r_i_n_g between
- calls to TTccll__AAsssseemmbblleeCCmmdd. TTccll__AAsssseemmbblleeCCmmdd supports commands
- of arbitrary length (up to the total memory limit imposed by
- the operating system, if any).
-
-
- KKEEYYWWOORRDDSS
- assemble, buffer, partial command
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Sprite v.1.0 Printed: April 19, 1991 2
-
-
-
-